<!--

 This file is part of the DbUnit module for NetBeans IDE
 Copyright (C) 2009 Pavol Pitoňák

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>Database Operations</title>
        <link rel="stylesheet" href="nbdocs:/org/netbeans/modules/usersguide/ide.css" type="text/css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <h2>Database Operations</h2>

        <h3>UPDATE</h3>
        <p>
            This operation updates the database from the dataset contents.
            This operation assumes that table data already exists in the target database
            and fails if this is not the case.
        </p>

        <h3>INSERT</h3>
        <p>
            This operation inserts the dataset contents into the database. This operation
            assumes that table data does not exist in the target database and fails if
            this is not the case. To prevent problems with foreign keys, tables must be sequenced
            appropriately in the dataset.
        </p>

        <h3>DELETE</h3>
        <p>
            This operation deletes only the dataset contents from the database.
            This operation does not delete the entire table contents but only data
            that are present in the dataset.
        </p>

        <h3>DELETE_ALL</h3>
        <p>
            Deletes all rows of tables present in the specified dataset. If the dataset
            does not contains a particular table, but that table exists in the database,
            the database table is not affected. Table are truncated in reverse sequence.
        </p>

        <h3>TRUNCATE</h3>
        <p>
            Truncate tables present in the specified dataset. If the dataset does not
            contains a particular table, but that table exists in the database, the database
            table is not affected. Table are truncated in reverse sequence.
        </p>

        <h3>REFRESH</h3>
        <p>
            This operation literally refreshes dataset contents into the target database.
            This means that data of existing rows are updated and non-existing row get inserted.
            Any rows which exist in the database but not in dataset stay unaffected. This
            approach is more appropriate for tests that assume other data may exist in the
            database. If they are correctly written, tests using this strategy can even be
            performed on a populated database like a copy of a production database.
        </p>


        <h3>CLEAN_INSERT</h3>
        <p>
            This composite operation performs a DELETE_ALL operation followed by an
            INSERT operation. This is the safest approach to ensure that the database
            is in a known state. This is appropriate for tests that require the database
            to only contain a specific set of data.
        </p>


        <h3>NONE</h3>
        <p>
            Empty operation that does absolutely nothing.
        </p>


    </body>
</html>
